﻿using CaffeeBuzz_WinForm.Cafe;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CaffeeBuzz_WinForm.BuzzMenu
{
    public class LunchMenuIterator : Iterator
    {
        Item[] Items;
        int pos = 0;
        public LunchMenuIterator(Item[] menu)
        {
            Items = menu;
        }
        public bool HasNext()
        {
            if (pos >= Items.Length || Items[pos] == null)
                return false;
            return true;
        }
        public Object Next()
        {
            Item mi = Items[pos];
            pos++;
            return mi;
        }
    }
}
